import QtQuick 2.6
import QtQuick.Layouts 1.2

import "../../Base/UiBase"
import "../../Base/Config"

Rectangle {
    id: root
    property url head
    property string name
    property string description
    property int nfocus
    property int nactive

    height: col.height
    color: Color.foreground
    Column {
        id: col
        width: parent.width
        RowLayout {
            width: parent.width
            height: 200 * Size.ratio
            spacing: 0
            Item {
                Layout.preferredWidth: height
                Layout.fillHeight: true
                HeadHolder {
                    anchors.centerIn: parent
                    SvgzImage {
                        width: 120 * Size.ratio
                        height: 120 * Size.ratio
                        source: head
                    }
                }
            }
            ColumnLayout {
                Layout.fillWidth: true
                Layout.fillHeight: true
                Layout.rightMargin: 20
                Text {
                    verticalAlignment: Text.AlignVCenter
                    Layout.fillWidth: true
                    Layout.fillHeight: true
                    text: name
                    font.pixelSize: Size.font26
                    color: Color.input
                }
                Text {
                    verticalAlignment: Text.AlignVCenter
                    Layout.fillWidth: true
                    Layout.fillHeight: true
                    text: description
                    font.pixelSize: Size.font26
                    color: Color.virtualInput
                }
                Text {
                    verticalAlignment: Text.AlignVCenter
                    Layout.fillWidth: true
                    Layout.fillHeight: true
                    text: qsTr("关注：") + nfocus
                    font.pixelSize: Size.font26
                    color: Color.virtualInput
                    Text {
                        anchors {
                            verticalCenter: parent.verticalCenter
                            left: parent.left
                            leftMargin: 200 * Size.ratio
                        }
                        text: qsTr("活跃：") + nactive
                        font.pixelSize: Size.font26
                        color: Color.virtualInput
                    }
                }
            }
        }
        RowLayout {
            width: parent.width
            height: 80 * Size.ratio
            spacing: 0
            MouseArea {
                Layout.fillWidth: true
                Layout.fillHeight: true
                SvgzImage {
                    anchors.centerIn: parent
                    width: 360 * Size.ratio
                    height: 80 * Size.ratio
                    source: "../../../resources/tcommunity/community/community/heng.svg"
                }

                RightDivider {
                }
            }
            MouseArea {
                Layout.fillWidth: true
                Layout.fillHeight: true
                SvgzImage {
                    anchors.centerIn: parent
                    width: 360 * Size.ratio
                    height: 80 * Size.ratio
                    source: "../../../resources/tcommunity/community/community/jiaru01.svg"
                }
            }
        }
    }
}
